<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <IgnoreForCI Condition="'$(TargetOS)' == 'browser'">true</IgnoreForCI>
  </PropertyGroup>
  <ItemGroup>
    <!-- Checked in test binaries for FileVersionInfoTest -->
    <Content Include="NativeConsoleApp.exe">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="NativeLibrary.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="SecondNativeLibrary.dll">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="..\System.Diagnostics.FileVersionInfo.TestAssembly\Assembly1.cs">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup Condition="'$(RunAOTCompilation)' == 'true'">
    <!-- Identifies native libraries that should be skipped during AOT -->
    <NativeLibraries Include="NativeLibrary.dll" />
    <NativeLibraries Include="SecondNativeLibrary.dll" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="FileVersionInfoTest.cs" />
    <Compile Include="AssemblyInfo.cs" />
    <Compile Include="$(CommonTestPath)System\IO\ReparsePointUtilities.cs"
             Link="Common\System\IO\ReparsePointUtilities.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="FileVersionInfoTest.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="ProductionCode\Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.VerLanguageName.cs"
             Link="ProductionCode\Common\Interop\Windows\Kernel32\Interop.VerLanguageName.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser'">
    <Compile Include="FileVersionInfoTest.Unix.cs" />
  </ItemGroup>
  <ItemGroup>
    <!-- Include the test assembly as Content. We don't do this on Browser to work around
         https://github.com/dotnet/runtime/issues/46856 that would proceed to treat Content as an assembly reference anyway.
         Works around: Found identical vfs mappings for target path: System.Diagnostics.FileVersionInfo.TestAssembly.dll, source file: .../System.Diagnostics.FileVersionInfo.TestAssembly.dll. Ignoring. -->
    <ProjectReference Include="..\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj" Condition="'$(TargetOS)' != 'browser'">
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </ProjectReference>
    <ProjectReference Include="..\System.Diagnostics.FileVersionInfo.TestAssembly\System.Diagnostics.FileVersionInfo.TestAssembly.csproj" Condition="'$(TargetOS)' == 'browser'" />
    <!-- R2R testing does not tolerate the combination of a regular project reference and a content reference. -->
    <!-- This is a bug in the SDK tracked here: https://github.com/dotnet/sdk/issues/30718 -->
    <PublishReadyToRunExclude Include="System.Diagnostics.FileVersionInfo.TestAssembly.dll" />
  </ItemGroup>
</Project>
